Crate training or getting a puppy pen teaches your puppy to stay in a space quietly playing or napping.
Consistency is key in teaching your new puppy good behavior and obedience.
Always make sure your pet is on a leash when you are outside, unless you are in a safe and secure fenced in area.